﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;
using Squog_1._1.Managers;


namespace Squog_1._1.Menu
{
    class LevelSelect : MainMenuWindow
    {
        ButtonLayout Layout;

        public LevelSelect()
            : base()
        {

        }

        public override void LoadContent(ContentManager Content)
        {
            base.LoadContent(Content);

            Layout = new ButtonLayout(new Vector2(0, 0));

            Layout.AddButtonToEnd("Level 1", MenuFont, true);
            Layout.SelectedDel += OnSelectHandeler;
        }

        private void OnSelectHandeler(object o, SelectedEventArgs e)
        {
                switch (e.SelectionNumber)
                {
                    case 0:
                        WindowManager.ChangeWindows(new LevelWindow("SampleMap"));
                        break;
                }
        }


        public override void Update(GameTime gameTime)
        {
            Layout.Update();

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
            Layout.DrawButtons(WindowsSpriteBatch);
        }
    }
}

